package com.kust.smarthome.web.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author iAuzre
 * @since 2021-07-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("notice")
@ApiModel("警告表")
public class Notice implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "id", required = true)
    private Integer id;

    @TableField("user_id")
    @ApiModelProperty(value = "用户id", required = true)
    private Integer userId;

    @TableField("type_id")
    @ApiModelProperty(value = "设备类型id", required = true)
    private Integer typeId;

    @TableField("device_id")
    @ApiModelProperty(value = "设备id", required = true)
    private Integer deviceId;

    @TableField("content")
    @ApiModelProperty(value = "警告内容", required = true)
    private String content;

    @TableField("created")
    @ApiModelProperty(value = "创建时间", required = true)
    private LocalDateTime created;

    @TableField("state")
    @ApiModelProperty(value = "这条数据的状态 0为用户未查看 1为用户已查看", required = true)
    private Integer state;

    @TableField(exist = false)
    private List<Notice> list;


}
